#定义工程名称

project (gtk_downloader)


#声明cmake最低版本
cmake_minimum_required(VERSION 2.8)


#头文件目录
INCLUDE_DIRECTORIES(
    ./include
    /usr/include/gtk-3.0
    /usr/include/at-spi2-atk/2.0
    /usr/include/at-spi-2.0
    /usr/include/dbus-1.0
    /usr/lib/x86_64-linux-gnu/dbus-1.0/include
    /usr/include/gtk-3.0
    /usr/include/gio-unix-2.0
    /usr/include/cairo
    /usr/include/pango-1.0
    /usr/include/harfbuzz
    /usr/include/pango-1.0
    /usr/include/atk-1.0
    /usr/include/cairo
    /usr/include/pixman-1
    /usr/include/freetype2
    /usr/include/libpng16
    /usr/include/freetype2 
    /usr/include/libpng16 
    /usr/include/gdk-pixbuf-2.0 
    /usr/include/libpng16 
    /usr/include/glib-2.0 
    /usr/lib/x86_64-linux-gnu/glib-2.0/include

    )



#链接库目录指定
LINK_DIRECTORIES(
   /usr/lib/x86_64-linux-gnu/
)



#源文件目录指定
SET(SOURCE 
    main.c
    common/sqlite_manager.c
    common/list.c
    common/http_manager.c
    common/cJSON.c
    
    model/taskinfo.c

    utils/utils.c

    ui/ui_main.c
    ui/ui_task.c
)


#设置库文件
SET(GTK_LIB 
    m
    pthread
    gtk-3 
    gdk-3 
    pangocairo-1.0 
    pango-1.0 
    atk-1.0 
    cairo-gobject 
    cairo 
    gdk_pixbuf-2.0 
    gio-2.0 
    gobject-2.0 
    glib-2.0
    sqlite3
    curl
)


#目标
ADD_EXECUTABLE(gtk_downloader ${SOURCE})

#指定链接库
TARGET_LINK_LIBRARIES(gtk_downloader ${GTK_LIB} ${CURL_LIB})